***************************************************************
*                                                             *  
* Leadership Selection in United Nations Peacekeepin 		  *
*                                                             *
* Kseniya Oksamytna,  Vincenzo Bove and Magnus Lundgren        *   
*                                                             *
* This Version: March 13, 2020	                              *
*                                                             *
***************************************************************


// SRSG 

clear

import excel "Data.xlsx", sheet("SRSG") firstrow 

global H1 p3  NATO cumulative_unsc     KOFPoGI  cinc
global H2 contribution ctroops oda_value  assessedcontributionadjusted2
global H3  SRSGpreviousexperiencedummy  previousSRSG vdem_libdem    
global controls  lingdist    distw  gle_rgdpc   i.year 

 


************************
* Table 1 *
************************

logit appointment $H1 $H2 $H3, clust(missionccode) 
 
logit appointment $H1 $H2 $H3 $controls , clust(missionccode) 
 
logit appointment  NATO   cumulative_unsc  KOFPoGI  cinc  $H2 $H3 $controls if p5==0, clust(missionccode)

logit appointment $H1 $H2 $H3 $controls if SRSG_ever==1, clust(missionccode)




************************
* Table A.1 *
************************


relogit  appointment $H1 $H2 $H3 gle_rgdpc lingdist  distw, clust(missionccode)    

logit appointment  $H1 $H2 $H3 $controls  i.ccode, clust(missionccode)

logit appointment  $H1 $H2 $H3 $controls  i.missionccode, clust(missionccode)
 
logit appointment $H1 $H2 $H3 $controls if  wdi_afpt_x>0 &  wdi_afpt_x!=., clust(missionccode)
 

************************
* Table A.3 *
************************


logit appointment $H1 $H2 $H3 $controls   , clust(missionccode) 

logit appointment $H1 $H2 $H3 $controls   if era ==1, clust(missionccode) 

logit appointment $H1 $H2 $H3 $controls   if era ==2, clust(missionccode) 
 
logit appointment $H1 $H2 $H3 $controls  if era ==3 , clust(missionccode) 
 

 
************************
* Figure 2.a *
************************


preserve
gen where=-0.001
gen pipe="|"
sum  KOFPoGI, d
local min = round(r(p1))
local max = round(r(p99))
local delta = round((r(max)-r(min))/20)
logit appointment $H1 $H2 $H3  gle_rgdpc lingdist  distw, clust(missionccode) 
margins, at(KOFPoGI=(0 (`delta') `max')) atmeans // 
marginsplot, yline(0) recast(line) recastci(rline)   ci1opts(lp(-) lc(black)) level(90)  ///
addplot (scatter where KOFPoGI if KOFPoGI <= `max', xlabel(0 (`delta') `max')   ms(none) /// 
blcolor(gray) mlabel(pipe) mlabpos(0)) legend(off)  xtitle("KOF Political Globalisation Index")  ///
 ytitle("Predicted Probability of SRSG Appointment") title("SRSG Appointment")   
restore


************************
* Figure 3.a*
************************

preserve
gen where=+0.0001
gen pipe="|"
sum  contribution, d
local min = r(p1) 
local max = r(p99) 
local delta =  0.1
logit appointment $H1 $H2 $H3 gle_rgdpc lingdist  distw, clust(missionccode) 
margins, at(contribution=(`min' (`delta') `max')) atmeans // 
marginsplot, yline(0) recast(line) recastci(rline)   ci1opts(lp(-) lc(black)) level(90)  ///
addplot ( scatter where contribution if contribution <= `max', xlabel(`min' (`delta') `max') ms(none) /// 
blcolor(gray) mlabel(pipe) mlabpos(0)) legend(off)  xtitle("Troop Contribution")  ///
 ytitle("Predicted Probability of SRSG Appointment") title("SRSG Appointment")  
restore


************************
* Figure 4.a *
************************


preserve
gen where=-0.0001
gen pipe="|"
sum   distw, d
local min = round(r(p1)) 
local max = round(r(p99))
local delta =  round((r(max)-r(min))/20)
logit appointment $H1 $H2 $H3 gle_rgdpc lingdist  distw, clust(missionccode) 
margins, at( distw=(0 (`delta') `max')) atmeans // 
marginsplot, yline(0) recast(line) recastci(rline)   ci1opts(lp(-) lc(black)) level(90)  ///
addplot (scatter where  distw if  distw <= `max' & year ==2004, xlabel(0 (`delta') `max') ms(none) /// 
blcolor(gray) mlabel(pipe) mlabpos(0)) legend(off)  xtitle("Distance (pop-wt, km, 000)")  ///
 ytitle("Predicted Probability of SRSG Appointment") title("SRSG Appointment")  
restore

************************
* Figure 5.a *
************************

 
 preserve
gen where=-0.0001
gen pipe="|"
logit appointment $H1 $H2 $H3 gle_rgdpc lingdist  distw, clust(missionccode) 
margins, at(previousSRSG=(0 1)) atmeans // 
marginsplot, yline(0) recast(scatter)   ci1opts(lp(-) lc(black)) level(90)  ///
legend(off)  xtitle("Previous SRSG same mission")  ///
 ytitle("Predicted Probability of SRSG Appointment") title("SRSG Appointment")  
restore

**********************************************************************************

// Force commanders

clear

import excel "Data.xlsx", sheet("FC") firstrow 

global H1 p3 NATO   cumulative_unsc  KOFPoGI  cinc
global H2 contribution ctroops oda_value  assessedcontributionadjusted2
global H3  FCpreviousexperiencedummy  previousFC vdem_libdem    
global controls gle_rgdpc   lingdist    distw     i.year 
 
 
 
************************
* Table 2 *
************************


logit appointment $H1 $H2 $H3, clust(missionccode) 
 
logit appointment $H1 $H2 $H3 $controls , clust(missionccode) 
 
logit appointment  NATO   cumulative_unsc  KOFPoGI  cinc $H2 $H3 $controls if p5==0, clust(missionccode)

logit appointment $H1 $H2 $H3 $controls if FC_ever==1, clust(missionccode)



************************
* Table A.2 *
************************


relogit appointment $H1 $H2 $H3 gle_rgdpc lingdist distw, clust(missionccode)    

logit appointment  $H1 $H2 $H3 $controls  i.ccode, clust(missionccode)

logit appointment  $H1 $H2 $H3 $controls  i.missionccode, clust(missionccode)
 
logit appointment $H1 $H2 $H3 $controls if  wdi_afpt_x>0 &  wdi_afpt_x!=., clust(missionccode)

 
************************
* Table A.4 *
************************



logit appointment $H1 $H2 $H3 $controls , clust(missionccode) 
 
logit appointment $H1 $H2 $H3 $controls if era==1, clust(missionccode) 
 
logit appointment $H1 $H2 $H3 $controls if era ==2, clust(missionccode) 
 
logit appointment $H1 $H2 $H3 $controls if era ==3, clust(missionccode) 
 

 
************************
* Figure 2.b *
************************

 
preserve
gen where=-0.001
gen pipe="|"
sum  KOFPoGI, d
local min = round(r(p1))
local max = round(r(p99))
local delta = round((r(max)-r(min))/20)
logit appointment $H1 $H2 $H3 gle_rgdpc lingdist distw, clust(missionccode) 
margins, at(KOFPoGI=(0 (`delta') `max')) atmeans // 
marginsplot, yline(0) recast(line) recastci(rline)   ci1opts(lp(-) lc(black)) level(90)  ///
addplot (scatter where KOFPoGI if KOFPoGI <= `max', xlabel(0 (`delta') `max') ms(none) /// 
blcolor(gray) mlabel(pipe) mlabpos(0)) legend(off)  xtitle("KOF Political Globalisation Index")  ///
 ytitle("Predicted Probability of FC Appointment") title("FC Appointment")  
restore


 

************************
* Figure 3.b *
************************

 
preserve
gen where=+0.0001
gen pipe="|"
sum  contribution, d
local min = r(p1) 
local max = r(p99) 
local delta =  0.1
logit appointment $H1 $H2 $H3 gle_rgdpc lingdist distw, clust(missionccode) 
margins, at(contribution=(`min' (`delta') `max')) atmeans // 
marginsplot, yline(0) recast(line) recastci(rline)   ci1opts(lp(-) lc(black)) level(90)  ///
addplot (scatter where contribution if contribution <= `max', xlabel(`min' (`delta') `max') ms(none) /// 
blcolor(gray) mlabel(pipe) mlabpos(0)) legend(off)  xtitle("Troop Contribution")  ///
 ytitle("Predicted Probability of FC Appointment") title("FC Appointment")  
restore


************************
* Figure 4.b *
************************


preserve
gen where=-0.0001
gen pipe="|"
sum   distw, d
local min = round(r(p1)) 
local max = round(r(p99))
local delta =  round((r(max)-r(min))/20)
logit appointment $H1 $H2 $H3 gle_rgdpc lingdist distw, clust(missionccode) 
margins, at( distw=(0 (`delta') `max')) atmeans // 
marginsplot, yline(0) recast(line) recastci(rline)   ci1opts(lp(-) lc(black)) level(90)  ///
addplot (scatter where  distw if  distw <= `max' & year ==2004, xlabel(0 (`delta') `max') ms(none) /// 
blcolor(gray) mlabel(pipe) mlabpos(0)) legend(off)  xtitle("Distance (pop-wt, km, 000)")  ///
 ytitle("Predicted Probability of FC Appointment") title("FC Appointment")  
restore

 

************************
* Figure 5.b *
************************


preserve
gen where=-0.0001
gen pipe="|"
logit appointment $H1 $H2 $H3 gle_rgdpc lingdist distw, clust(missionccode) 
margins, at(previousFC=(0 1)) atmeans // 
marginsplot, yline(0)   recast(scatter)   ci1opts(lp(-) lc(black)) level(90)  ///
legend(off)  xtitle("Previous FC same mission")  ///
 ytitle("Predicted Probability of FC Appointment") title("FC Appointment")  
restore

 


